package com.kosmos.dubhe.wxcp.config;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.Strings;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

import java.util.Arrays;

/**
 * @author wukai
 * @Date 2025-04-04 18:19
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class EnvironmentHolder {

    private final Environment environment;

    public String getActiveProfilesName() {
        return Strings.join(Arrays.asList((environment.getActiveProfiles())), '|');
    }
}
